<%--
  Created by IntelliJ IDEA.
  User: asd73
  Date: 2017/9/24
  Time: 21:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="../avalon/avalon_1.5.js"></script>
    <script>
        avalon.filters.parseSymbol = function (str) {
            return{
                '元' : '元',
                'USD' : '美元'
            }[str];
        };
        avalon.ready(function () {
            avalon.define({
                $id: "test",
                cont: "<b>没有传参，用于将文本绑定转换为HTML绑定",
                word1: "avalon learning 大写化",
                word2: "Felix LU小写化",
                string: "对长字符进行截短",
                variable: "webkit-box-flex 驼峰化处理",
                string2: "<b>对类似于HRML格式的字符串进行转义</b>",
                money:1233.444,
                num: 12354.54654,
                custom: "<i>这是一段自定义的字符串 This is a custom string</i>"
            });
            avalon.scan();
        })
    </script>
</head>
<body>
    <div ms-controller="test">
        <div>{{cont|html}}</div><%--直接以html形式进行显示--%>
        <div>{{word1|update}}</div><%--转为大写--%>
        <div>{{word2|lowercase}}</div><%--转为小写--%>
        <div>{{string|truncate（3,'......'}}</div><%--截取字符串并替换为....--%>
        <div>{{variable|camelize}}</div><%--去掉短线驼峰处理--%>
        <div>{{string2|escape}}</div>
        <div>{{money|currency('$')}}</div>
        <div>{{num|number(3)}}</div>
        <div>{{num|number(2,'.')}}</div>
        <div>{{num|number(2,'.',','}}</div><%--设定小数点位置和千位分隔符--%>
        <br/>
        <div>{{new Date | date("yyyy MM dd HH:mm:ss a")}}</div>
        <div>{{"2011/07/08" | date("yyyy MM dd HH:mm:ss")}}</div>
        <div>{{"2011/07/08" | date("EEEE MM dd yyyy")}}</div>
        <div>{{"2011-07-08" | date("yy/MM/dd")}}</div>
        <div>{{"01-01-1999" | date("yyyy年MM月dd日")}}</div>
        <div>{{"03 04,2000" | date("yyyy-MM-dd HH:mm:ss")}}</div>
        <div>{{1373021259229 | date("yyyy-MM-dd HH:mm:ss")}}</div>
        <div>{{141647864545" | date("yyyy/MM/dd H:m:s")}}</div>
        <div>{{custom|html|uppercase}}</div>
        <div>{{"USD"|parseSymbol}}</div>
    </div>


</body>
</html>
